# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=libmikmod
pkgver=3.3.11.1
pkgrel=1
pkgdesc="A portable sound library"
license=(GPL LGPL)
url="http://mikmod.sourceforge.net"
arch=(x86_64)
depends=(libpulse sh)
makedepends=(alsa-lib)
source=(https://downloads.sourceforge.net/mikmod/$pkgname-$pkgver.tar.gz)
sha256sums=('ad9d64dfc8f83684876419ea7cd4ff4a41d8bcd8c23ef37ecb3a200a16b46d19')

prepare() {
  mkdir build
}

build() {
  cd build
  ../$pkgname-$pkgver/configure \
    --prefix=/usr \
    --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}

